package com.zhiyou100.poly;

public class Test {

    public static void main(String[] args) {

        Student student = new Student();

        Teacher teacher = new Teacher();

        //多态  父类类型的引用变量  可以 利用继承指向不同的子类类型的对象
        Person person = new Person();

        person = new Student();

        person = new Teacher();
    }

}
